/** @type {typeof import("net.minecraft.network.chat.Style").$Style } */
let $Style  = Java.loadClass("net.minecraft.network.chat.Style")
/** @type {typeof import("net.minecraft.ChatFormatting").$ChatFormatting } */
let $ChatFormatting  = Java.loadClass("net.minecraft.ChatFormatting")
/** @type {typeof import("net.minecraft.world.effect.MobEffectInstance").$MobEffectInstance } */
let $MobEffectInstance  = Java.loadClass("net.minecraft.world.effect.MobEffectInstance")
/** @type {typeof import("java.util.ArrayList").$ArrayList } */
let $ArrayList  = Java.loadClass("java.util.ArrayList")
/** @type {typeof import("net.minecraft.network.chat.Component").$Component } */
let $Component  = Java.loadClass("net.minecraft.network.chat.Component")
/** @type {typeof import("net.minecraft.world.damagesource.DamageSource").$DamageSource } */
const $DamageSource  = Java.loadClass("net.minecraft.world.damagesource.DamageSource")
/** @type {typeof import("net.minecraft.world.item.ItemStack").$ItemStack } */
const $ItemStack  = Java.loadClass("net.minecraft.world.item.ItemStack")
/** @type {typeof import("top.theillusivec4.curios.api.SlotContext").$SlotContext } */
const $SlotContext  = Java.loadClass("top.theillusivec4.curios.api.SlotContext")

ItemEvents.modification(event => {
    event.modify('twilightforest:snow_queen_trophy', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .onEquip((slotContext, oldStack, newStack) => { 
                })
                .onUnequip((slotContext, oldStack, newStack) => {
                })
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("暮凛冰皇的祝福").withStyle($ChatFormatting.BLUE, $ChatFormatting.BLUE))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "apothic_attributes:experience_gained",
                        UUID,
                        4,
                        'add_value'
                    )
                    attributeModificationContext.modify(
                        "irons_spellbooks:ice_spell_power",
                        UUID,
                        0.25,
                        'add_value'
                    )
                    attributeModificationContext.modify(
                        "irons_spellbooks:max_mana",
                        UUID,
                        100,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
    event.modify('twilightforest:lich_trophy', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .curioTick(
                    (slotContext, stack) => {
                })
                .onEquip((slotContext, oldStack, newStack) => { 
                })
                .onUnequip((slotContext, oldStack, newStack) => {
                })
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("暮光巫妖的祝福").withStyle($ChatFormatting.YELLOW, $ChatFormatting.YELLOW))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "apothic_attributes:life_steal",
                        UUID,
                        0.3,
                        'add_multiplied_total'
                    )
                    attributeModificationContext.modify(
                        "irons_spellbooks:blood_spell_power",
                        UUID,
                        0.25,
                        'add_value'
                    )
                    attributeModificationContext.modify(
                        "irons_spellbooks:max_mana",
                        UUID,
                        50,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
    event.modify('twilightforest:naga_trophy', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .curioTick(
                    (slotContext, stack) => {
                })
                .onEquip((slotContext, oldStack, newStack) => { 
                })
                .onUnequip((slotContext, oldStack, newStack) => {
                })
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("暮林长蛟的祝福").withStyle($ChatFormatting.GREEN, $ChatFormatting.GREEN))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "apothic_attributes:healing_received",
                        UUID,
                        0.3,
                        'add_value'
                    )
                    attributeModificationContext.modify(
                        "irons_spellbooks:nature_spell_power",
                        UUID,
                        0.25,
                        'add_value'
                    )
                    attributeModificationContext.modify(
                        "irons_spellbooks:max_mana",
                        UUID,
                        50,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
    event.modify('twilightforest:quest_ram_trophy', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .curioTick(
                    (slotContext, stack) => {
                })
                .onEquip((slotContext, oldStack, newStack) => { 
                })
                .onUnequip((slotContext, oldStack, newStack) => {
                })
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("佐巴洋的祝福(bushi").withStyle($ChatFormatting.WHITE, $ChatFormatting.WHITE))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "minecraft:generic.luck",
                        UUID,
                        10,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
    event.modify('twilightforest:minoshroom_trophy', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .curioTick(
                    (slotContext, stack) => {
                })
                .onEquip((slotContext, oldStack, newStack) => { 
                })
                .onUnequip((slotContext, oldStack, newStack) => {
                })
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("暮蕈战魁的祝福").withStyle($ChatFormatting.RED, $ChatFormatting.RED))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "minecraft:generic.max_health",
                        UUID,
                        20,
                        'add_value'
                    )
                        attributeModificationContext.modify(
                        "apothic_attributes:crit_damage",
                        UUID,
                        0.3,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
    event.modify('twilightforest:alpha_yeti_trophy', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .curioTick(
                    (slotContext, stack) => {
                })
                .onEquip((slotContext, oldStack, newStack) => { 
                })
                .onUnequip((slotContext, oldStack, newStack) => {
                })
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("暮淞巨灵的祝福").withStyle($ChatFormatting.DARK_BLUE, $ChatFormatting.DARK_BLUE))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "apothic_attributes:armor_shred",
                        UUID,
                        0.3,
                        'add_value'
                    )
                        attributeModificationContext.modify(
                        "irons_spellbooks:ice_magic_resist",
                        UUID,
                        0.3,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
    event.modify('twilightforest:knight_phantom_trophy', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .curioTick(
                    (slotContext, stack) => {
                })
                .onEquip((slotContext, oldStack, newStack) => { 
                })
                .onUnequip((slotContext, oldStack, newStack) => {
                })
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("暮影幽骑的祝福").withStyle($ChatFormatting.DARK_GREEN, $ChatFormatting.DARK_GREEN))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "apothic_attributes:dodge_chance",
                        UUID,
                        0.2,
                        'add_value'
                    )
                        attributeModificationContext.modify(
                        "apothic_attributes:crit_chance",
                        UUID,
                        0.3,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
    event.modify('twilightforest:ur_ghast_trophy', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .curioTick(
                    (slotContext, stack) => {
                })
                .onEquip((slotContext, oldStack, newStack) => { 
                })
                .onUnequip((slotContext, oldStack, newStack) => {
                })
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("暮初恶魂的祝福").withStyle($ChatFormatting.DARK_RED, $ChatFormatting.DARK_RED))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "apothic_attributes:fire_damage",
                        UUID,
                        10,
                        'add_value'
                    )
                    attributeModificationContext.modify(
                        "irons_spellbooks:spell_power",
                        UUID,
                        0.25,
                        'add_value'
                    )
                    attributeModificationContext.modify(
                        "irons_spellbooks:max_mana",
                        UUID,
                        100,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
    event.modify('twilightforest:hydra_trophy', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .curioTick(
                    (slotContext, stack) => {
                })
                .onEquip((slotContext, oldStack, newStack) => { 
                })
                .onUnequip((slotContext, oldStack, newStack) => {
                })
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("暮烬天虬的祝福").withStyle($ChatFormatting.DARK_PURPLE, $ChatFormatting.DARK_PURPLE))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "irons_spellbooks:fire_magic_resist",
                        UUID,
                        0.3,
                        'add_value'
                    )
                        attributeModificationContext.modify(
                        "irons_spellbooks:fire_spell_power",
                        UUID,
                        0.5,
                        'add_value'
                    )
                        attributeModificationContext.modify(
                        "minecraft:generic.armor",
                        UUID,
                        20,
                        'add_value'
                    )
                    attributeModificationContext.modify(
                        "irons_spellbooks:max_mana",
                        UUID,
                        100,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
    event.modify('cataclysm:blazing_grips', modifications => {
        modifications.attachCuriosCapability(
            CuriosJSCapabilityBuilder.create()
                .modifySlotsTooltip((tooltips, context, stack) => {
                    if(context&&context.level()&&context.level().isClientSide()) {
                        tooltips = new $ArrayList(tooltips)
                        tooltips.add($Component.literal("吾焰长明...").withStyle($ChatFormatting.YELLOW, $ChatFormatting.YELLOW))
                    }
                    return tooltips
                })
                .modifyAttribute(attributeModificationContext => {
                    let { slotContext, UUID, stack, modifiers } = attributeModificationContext
                    attributeModificationContext.modify(
                        "apothic_attributes:life_steal",
                        UUID,
                        0.3,
                        'add_value'
                    )
                })
                .canDrop((slotContext, source, lootingLevel, recentlyHit, stack) => true)
                .modifyLootingLevel((slotContext, source, target, baseLooting, stack) => 0)
                .makesPiglinsNeutral((slotContext, stack) => false)
        )
    })
})